class Pic {
    constructor(data) {
        this.createPicFromData(data)
    }

    createPicFromData(data) {
        this.id = data.id

        this.type = data.type
        this.url = data.url

    }

    toPic() {
        return {
            id: this.id,
            type: this.type
        }
    }
}

module.exports = Pic